package com.example.anliku.service.serviceImpl;

import com.example.anliku.entity.*;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import com.example.anliku.mapper.ExampleCommentMapper;
import com.example.anliku.service.ExampleCommentService;

import java.util.HashMap;
import java.util.List;

@Service
public class ExampleCommentServiceImpl implements ExampleCommentService{

    @Resource
    private ExampleCommentMapper exampleCommentMapper;

    @Override
    public int deleteByPrimaryKey(Integer exampleCommentId) {
        return exampleCommentMapper.deleteByPrimaryKey(exampleCommentId);
    }

    @Override
    public int insert(ExampleComment record) {
        return exampleCommentMapper.insert(record);
    }

    @Override
    public Message insertSelective(ExampleComment record) {
        return exampleCommentMapper.insertSelective(record) > 0 ? Message.success(null) : Message.fail(null);
    }

    @Override
    public ExampleComment selectByPrimaryKey(Integer exampleCommentId) {
        return exampleCommentMapper.selectByPrimaryKey(exampleCommentId);
    }

    @Override
    public int updateByPrimaryKeySelective(ExampleComment record) {
        return exampleCommentMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(ExampleComment record) {
        return exampleCommentMapper.updateByPrimaryKey(record);
    }

    @Override
    public Message selectAllByExampleCommentExampleId(Integer exampleCommentExampleId) {
        return Message.success(null).add(exampleCommentMapper.selectAllByExampleCommentExampleId(exampleCommentExampleId));
    }

}
